/**
 * Created with IntelliJ IDEA.
 *
 * @author: cxs
 * @date: 2023/6/26
 * @time: 17:16
 * @className：AccountServiceImpl
 * @description：
 */
package com.bailan.sys.service.impl;

import com.bailan.sys.mapper.AccountMapper;
import com.bailan.sys.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class AccountServiceImpl implements AccountService {
    @Autowired
    AccountMapper mapper;
    @Override
    public int updateTransfer(String inName, String outName, double money) {
        try {
            mapper.transferIn(inName, money);
            mapper.transferOut(outName, money);
          int i;
            return 1;
        }catch (Exception e){
            System.out.println(e);
            return 0;
        }
    }
}
